<?php /* Smarty version 2.6.26, created on 2018-07-25 15:39:36
         compiled from E:%5CWWW%5C40.125.208.171%5Cvweb/admin%5Ctemplates/goods_sku/index.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>  
<div class="nav"><span>产品规格</span></div>
<div class="explain">
	<div class="name"><span>操作提示</span></div>
	<div class="con">
		<p>产品规格：可以理解为一件商品的不同型号，一样的款式，适合不同的人来使用。</p> 
		<p>比如：一件衣服它是长袖，无领，纯色，纯棉的，这个是属性。同一款式对应他的规格为：大小，颜色，码数状态等。</p>
	</div> 
</div>
<div class="filter">
	<?php if ($_GET['pid']): ?> 
		<a href="javascript:;" onClick="edit_scon('添加规格值','?m=goods_sku&a=edit&pid=<?php echo $_GET['pid']; ?>
')" class="add">添加规格值</a> 
		<a href="?m=goods_sku&a=index" class="button">返回上一层</a> 
	<?php else: ?>
		<a href="javascript:;" onClick="edit_scon('添加规格名','?m=goods_sku&a=edit')" class="add">添加规格名</a>
	<?php endif; ?> 
</div>
<div class="main">   
	<table width="100%" class="ltable">
	  	<thead>
		  	<tr> 
				<th width="350"><?php if ($_GET['pid']): ?>规格值<?php else: ?>规格名<?php endif; ?></td> 
				<?php if ($_GET['pid'] == ''): ?> 
					<th width="150">所属分类</th>
				<?php endif; ?>
				<th width="120">排序</th> 	
				<th width="120">操作</th>
				<th></th> 
		  	</tr>
	  	</thead>
		<tbody>
		<?php if ($this->_tpl_vars['data']['list']): ?>
			<?php $_from = $this->_tpl_vars['data']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
				<tr>
					<?php if ($_GET['pid']): ?>
						<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |-- &nbsp;<?php echo $this->_tpl_vars['i']['name']; ?>
</td> 
					<?php else: ?>
						<td><a href="?m=goods_sku&a=index&pid=<?php echo $this->_tpl_vars['i']['id']; ?>
" class="down"><?php echo $this->_tpl_vars['i']['name']; ?>
</a></td> 
					<?php endif; ?>
					<?php if ($_GET['pid'] == ''): ?> 
						<td><?php echo $this->_tpl_vars['i']['gcname']; ?>
</td>
					<?php endif; ?>
					<td><?php echo $this->_tpl_vars['i']['px']; ?>
</td>
					<td> 
						<a href="javascript:;" onClick="edit_scon('修改规格','?m=goods_sku&a=edit&pid=<?php echo $this->_tpl_vars['i']['pid']; ?>
&id=<?php echo $this->_tpl_vars['i']['id']; ?>
');" class="edit">修改</a> 
						<a href="javascript:;" data-id="<?php echo $this->_tpl_vars['i']['id']; ?>
" class="del">删除</a>
					</td>
					<td></td>
				</tr>
			<?php endforeach; endif; unset($_from); ?> 
		<?php else: ?>
				<tr><td colspan="5">无数据</td></tr>
		<?php endif; ?>
		</tbody>
	</table> 
	<?php if ($this->_tpl_vars['data']['page']): ?><div class="page"><?php echo $this->_tpl_vars['data']['page']; ?>
</div><?php endif; ?>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>  
<script type="text/javascript">
_delete('?m=goods_sku&a=del');
function edit_scon(name,url){  
	parent.dialog(name,url); 
} 
</script>